package edu.cqbvc.dao;

import java.sql.Date;
import java.util.Objects;

public class BorrowingInfo {
	private String borrowUserId;
	private String borrowUserName;
	private Integer borrowBookId;
	private String borrowBookName;
	private String borrowBookAuthor;
	private Date borrowPubDate;
	private Integer borrowReturnDate;
	
	
	public BorrowingInfo() {
		
	}
	
	
	
	public BorrowingInfo(String borrowUserId, String borrowUserName, Integer borrowBookId, String borrowBookName,
			String borrowBookAuthor, Date borrowPubDate, Integer borrowReturnDate) {
		super();
		this.borrowUserId = borrowUserId;
		this.borrowUserName = borrowUserName;
		this.borrowBookId = borrowBookId;
		this.borrowBookName = borrowBookName;
		this.borrowBookAuthor = borrowBookAuthor;
		this.borrowPubDate = borrowPubDate;
		this.borrowReturnDate = borrowReturnDate;
	}



	public String getBorrowUserId() {
		return borrowUserId;
	}



	public void setBorrowUserId(String borrowUserId) {
		this.borrowUserId = borrowUserId;
	}



	public String getBorrowUserName() {
		return borrowUserName;
	}



	public void setBorrowUserName(String borrowUserName) {
		this.borrowUserName = borrowUserName;
	}



	public Integer getBorrowBookId() {
		return borrowBookId;
	}



	public void setBorrowBookId(Integer borrowBookId) {
		this.borrowBookId = borrowBookId;
	}



	public String getBorrowBookName() {
		return borrowBookName;
	}



	public void setBorrowBookName(String borrowBookName) {
		this.borrowBookName = borrowBookName;
	}



	public String getBorrowBookAuthor() {
		return borrowBookAuthor;
	}



	public void setBorrowBookAuthor(String borrowBookAuthor) {
		this.borrowBookAuthor = borrowBookAuthor;
	}



	public Date getBorrowPubDate() {
		return borrowPubDate;
	}



	public void setBorrowPubDate(Date borrowPubDate) {
		this.borrowPubDate = borrowPubDate;
	}



	public Integer getborrowReturnDate() {
		return borrowReturnDate;
	}



	public void setborrowReturnDate(Integer borrowReturnDate) {
		this.borrowReturnDate = borrowReturnDate;
	}



	@Override
	public int hashCode() {
		return Objects.hash(borrowBookAuthor, borrowBookId, borrowBookName, borrowPubDate, borrowUserId, borrowUserName,
				borrowReturnDate);
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (!(obj instanceof BorrowingInfo)) {
			return false;
		}
		BorrowingInfo other = (BorrowingInfo) obj;
		return Objects.equals(borrowBookAuthor, other.borrowBookAuthor)
				&& Objects.equals(borrowBookId, other.borrowBookId)
				&& Objects.equals(borrowBookName, other.borrowBookName)
				&& Objects.equals(borrowPubDate, other.borrowPubDate)
				&& Objects.equals(borrowUserId, other.borrowUserId)
				&& Objects.equals(borrowUserName, other.borrowUserName) && Objects.equals(borrowReturnDate, other.borrowReturnDate);
	}

	@Override
	public String toString() {
		return getBorrowUserName();
	}
	
	
	
}
